<template>
    <div>
        <page-header @toLastPage="toLastPage">
        <template v-slot:title>
        添加朋友
      </template>
        </page-header>
    <div class="addinput" @click="toAddPage">
        <div class="center">
            <van-icon name="search" />
            微信号/邮箱号
        </div>
    </div>
    <div class="mine f-center" @click="showErweima">
        <div class="weNum">
            我的微信号:MZT970917
        </div>
        <div class="erweima">
            <svg class="icon" aria-hidden="true">
            <use xlink:href="#icon-ico"></use>
            </svg>
        </div>
    </div>
    <div class="list">
        <div v-for="(item,index) in addList" :key="index">
      <contacts-list :contactsData=item :line="addList.length-1===index?false:true"></contacts-list>
    </div>
    </div>
   </div>
</template>
<script>
import pageHeader from '../common/pageHeader';
import contactsList from '../common/contactsList';
export default {
    components:{
        pageHeader,
        contactsList
    },
    methods:{
        toLastPage(){
            this.$router.go(-1)
        },
        showErweima(){
            this.$toast('二维码')
        },
        toAddPage(){
            this.$router.push('/addPage')
        }
    },
    data() {
        return {
        addList:[
        {
        icon:'#icon-leida',
        name:'雷达加朋友',
        color:'#6367E5',
        isTip:false,
        event:''
      },
      {
        icon:'#icon-qunliao',
        name:'面对面建群聊',
        color:'#02C261',
        isTip:false
      },
      {
        icon:'#icon-saoyisao2',
        name:'扫一扫',
        color:'#1485ED',
        isTip:false
      },
      {
        icon:'#icon-xindepengyou',
        name:'手机联系人',
        color:'#F6A13B',
        isTip:false
      },
       {
        icon:'#icon-gzh',
        name:'公众号',
        color:'#287FD6',
        isTip:false
      },
       {
        icon:'#icon-qiyeweixin',
        name:'企业微信联系人',
        color:'#287FD6',
        isTip:false
      }
      ]
        }
    },
}
</script>
<style scoped>
    .addinput{
        background-color: #fff;
        margin:2rem .5rem .5rem;
        text-align: center;
        font-size: .6rem;
        line-height: 1.2rem;
        color: #999;
    }
    .mine{
        text-align: center;
        font-size: .5rem;
        color: #666;

    }
    .list{
        margin-top: 1rem;
    }
</style>